Skip to content

Fix styler excel example - take 2 #49996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2022
Merged

Fix styler excel example - take 2 #49996

merged 2 commits into from
Dec 2, 2022

Conversation

janosh
Copy link
Contributor

@janosh janosh commented Dec 1, 2022

TypeError: () takes 0 positional arguments but 1 was given.

Following #49971 (comment).

TypeError: <lambda>() takes 0 positional arguments but 1 was given
@mroeschke mroeschke added Docs Styler conditional formatting using DataFrame.style labels Dec 1, 2022
@@ -1110,7 +1110,7 @@ def format(

>>> df = pd.DataFrame({"A": [1, 0, -1]})
>>> pseudo_css = "number-format: 0§[Red](0)§-§@;"
>>> df.style.applymap(lambda: pseudo_css).to_excel("formatted_file.xlsx")
>>> df.style.applymap(lambda v: pseudo_css).to_excel("formatted_file.xlsx")
... # doctest: +SKIP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean # doctest: +SKIP?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@phofl phofl added this to the 2.0 milestone Dec 2, 2022
@mroeschke mroeschke merged commit ffd8b00 into pandas-dev:main Dec 2, 2022
@mroeschke
Copy link
Member

Thanks @janosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants